package com.qdxwx.models.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;

public class UserCount implements Serializable {

    private static final long serialVersionUID = 6086186986999699394L;

    private Long id;

    private Integer pictureDownDay;
    private Integer pictureDownMonth;
    private Integer pictureDownAll;

    private Integer pictureUploadDay;
    private Integer pictureUploadMonth;
    private Integer pictureUploadAll;

    private Integer documentDownDay;
    private Integer documentDownMonth;
    private Integer documentDownAll;

    private Integer documentUploadDay;
    private Integer documentUploadMonth;
    private Integer documentUploadAll;

    private Integer courseDownDay;
    private Integer courseDownMonth;
    private Integer courseDownAll;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    public UserCount() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getPictureDownDay() {
        return pictureDownDay;
    }

    public void setPictureDownDay(Integer pictureDownDay) {
        this.pictureDownDay = pictureDownDay;
    }

    public Integer getPictureDownMonth() {
        return pictureDownMonth;
    }

    public void setPictureDownMonth(Integer pictureDownMonth) {
        this.pictureDownMonth = pictureDownMonth;
    }

    public Integer getPictureDownAll() {
        return pictureDownAll;
    }

    public void setPictureDownAll(Integer pictureDownAll) {
        this.pictureDownAll = pictureDownAll;
    }

    public Integer getPictureUploadDay() {
        return pictureUploadDay;
    }

    public void setPictureUploadDay(Integer pictureUploadDay) {
        this.pictureUploadDay = pictureUploadDay;
    }

    public Integer getPictureUploadMonth() {
        return pictureUploadMonth;
    }

    public void setPictureUploadMonth(Integer pictureUploadMonth) {
        this.pictureUploadMonth = pictureUploadMonth;
    }

    public Integer getPictureUploadAll() {
        return pictureUploadAll;
    }

    public void setPictureUploadAll(Integer pictureUploadAll) {
        this.pictureUploadAll = pictureUploadAll;
    }

    public Integer getDocumentDownDay() {
        return documentDownDay;
    }

    public void setDocumentDownDay(Integer documentDownDay) {
        this.documentDownDay = documentDownDay;
    }

    public Integer getDocumentDownMonth() {
        return documentDownMonth;
    }

    public void setDocumentDownMonth(Integer documentDownMonth) {
        this.documentDownMonth = documentDownMonth;
    }

    public Integer getDocumentDownAll() {
        return documentDownAll;
    }

    public void setDocumentDownAll(Integer documentDownAll) {
        this.documentDownAll = documentDownAll;
    }

    public Integer getDocumentUploadDay() {
        return documentUploadDay;
    }

    public void setDocumentUploadDay(Integer documentUploadDay) {
        this.documentUploadDay = documentUploadDay;
    }

    public Integer getDocumentUploadMonth() {
        return documentUploadMonth;
    }

    public void setDocumentUploadMonth(Integer documentUploadMonth) {
        this.documentUploadMonth = documentUploadMonth;
    }

    public Integer getDocumentUploadAll() {
        return documentUploadAll;
    }

    public void setDocumentUploadAll(Integer documentUploadAll) {
        this.documentUploadAll = documentUploadAll;
    }

    public Integer getCourseDownDay() {
        return courseDownDay;
    }

    public void setCourseDownDay(Integer courseDownDay) {
        this.courseDownDay = courseDownDay;
    }

    public Integer getCourseDownMonth() {
        return courseDownMonth;
    }

    public void setCourseDownMonth(Integer courseDownMonth) {
        this.courseDownMonth = courseDownMonth;
    }

    public Integer getCourseDownAll() {
        return courseDownAll;
    }

    public void setCourseDownAll(Integer courseDownAll) {
        this.courseDownAll = courseDownAll;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "UserCount{" +
                "id=" + id +
                ", pictureDownDay=" + pictureDownDay +
                ", pictureDownMonth=" + pictureDownMonth +
                ", pictureDownAll=" + pictureDownAll +
                ", pictureUploadDay=" + pictureUploadDay +
                ", pictureUploadMonth=" + pictureUploadMonth +
                ", pictureUploadAll=" + pictureUploadAll +
                ", documentDownDay=" + documentDownDay +
                ", documentDownMonth=" + documentDownMonth +
                ", documentDownAll=" + documentDownAll +
                ", documentUploadDay=" + documentUploadDay +
                ", documentUploadMonth=" + documentUploadMonth +
                ", documentUploadAll=" + documentUploadAll +
                ", courseDownDay=" + courseDownDay +
                ", courseDownMonth=" + courseDownMonth +
                ", courseDownAll=" + courseDownAll +
                ", updateTime=" + updateTime +
                '}';
    }

    public void addPictureDown(int number) {
        if (this.pictureDownDay == null) this.pictureDownDay = 0;
        if (this.pictureDownMonth == null) this.pictureDownMonth = 0;
        if (this.pictureDownAll == null) this.pictureDownAll = 0;
        this.pictureDownDay = this.pictureDownDay + number;
        this.pictureDownMonth = this.pictureDownMonth + number;
        this.pictureDownAll = this.pictureDownAll + number;
    }

    public void addPictureUpload(int number) {
        if (this.pictureUploadDay == null) this.pictureUploadDay = 0;
        if (this.pictureUploadMonth == null) this.pictureUploadMonth = 0;
        if (this.pictureUploadAll == null) this.pictureUploadAll = 0;
        this.pictureUploadDay = this.pictureUploadDay + number;
        this.pictureUploadMonth = this.pictureUploadMonth + number;
        this.pictureUploadAll = this.pictureUploadAll + number;
    }

    public void addDocumentDown(int number) {
        if (this.documentDownDay == null) this.documentDownDay = 0;
        if (this.documentDownMonth == null) this.documentDownMonth = 0;
        if (this.documentDownAll == null) this.documentDownAll = 0;
        this.documentDownDay = this.documentDownDay + number;
        this.documentDownMonth = this.documentDownMonth + number;
        this.documentDownAll = this.documentDownAll + number;
    }

    public void addDocumentUpload(int number) {
        if (this.documentUploadDay == null) this.documentUploadDay = 0;
        if (this.documentUploadMonth == null) this.documentUploadMonth = 0;
        if (this.documentUploadAll == null) this.documentUploadAll = 0;
        this.documentUploadDay = this.documentUploadDay + number;
        this.documentUploadMonth = this.documentUploadMonth + number;
        this.documentUploadAll = this.documentUploadAll + number;
    }

    public void addCourseDown(int number) {
        if (this.courseDownDay == null) this.courseDownDay = 0;
        if (this.courseDownMonth == null) this.courseDownMonth = 0;
        if (this.courseDownAll == null) this.courseDownAll = 0;
        this.courseDownDay = this.courseDownDay + number;
        this.courseDownMonth = this.courseDownMonth + number;
        this.courseDownAll = this.courseDownAll + number;
    }


    public void initDayAll() {
        pictureDownDay = 0;
        pictureUploadDay = 0;
        documentDownDay = 0;
        documentUploadDay = 0;
        courseDownDay = 0;
    }

    public void initMonthAll() {
        pictureDownMonth = 0;
        pictureUploadMonth = 0;
        documentDownMonth = 0;
        documentUploadMonth = 0;
        courseDownMonth = 0;
    }

    public void initAll() {
        pictureDownAll = 0;
        pictureUploadAll = 0;
        documentDownAll = 0;
        documentUploadAll = 0;
        courseDownAll = 0;
        initMonthAll();
        initDayAll();
    }
}
